#ifndef JLISTMODULE_H
#define JLISTMODULE_H

#include "jtable.h"

class JListModel:public wxDataViewVirtualListModel
{
protected:
    JTablePtr m_table;
protected:


public:
    JListModel(JTablePtr tb);

    inline JTablePtr getTable(){return m_table;}
    virtual unsigned int GetColumnCount() const ;
    virtual wxString GetColumnType( unsigned int col ) const ;
    virtual void GetValueByRow( wxVariant &variant,
                                    unsigned int row, unsigned int col ) const wxOVERRIDE;
    virtual bool GetAttrByRow( unsigned int row, unsigned int col,
                               wxDataViewItemAttr &attr ) const wxOVERRIDE;
    virtual bool SetValueByRow( const wxVariant &variant,
                                unsigned int row, unsigned int col ) wxOVERRIDE;
    JListModel();
};

#endif // JLISTMODULE_H
